package com.hxx.day4.front;
import com.hxx.day4.controller.UserController;
import java.util.Scanner;

public class UserFront {
    public static void main(String[] args) {
        // 创建控制层对象
        UserController userController = new UserController();
        //控制台对象
        Scanner scanner = new Scanner(System.in);
        boolean flag = true;
        do{
            System.out.println("1.保存用户,2.显示，3.更新,4.删除,5.退出");
            int key = scanner.nextInt();
            switch (key){
                case 1:
                    userController.save(scanner);
                    break;
                case 2:
                    userController.show();
                    break;

                case 3:
                    userController.update(scanner);
                    break;

                case 4:
                    userController.delete(scanner);
                    break;
                case 5:
                    flag = false;
                    break;
            }

        }while (flag);
    }
}





















